
6.4.2 Bus’s On-Board Diagnostics (OBD)
Most modern cars and buses come equipped with an On-Board Diagnostics (OBD)
system, but it is yet to be veried whether the shuttle buses support this feature. OBD
systems provide velocity data, which is the same as what is displayed on the dashboard
speedometer.
To determine the distance covered, sampling and integration of velocity data are
required. However, this method introduces a signicant risk of error accumulation over
time. Small inaccuracies in velocity readings or sampling intervals can lead to progres-
sively larger discrepancies in calculated distance.
Using the OBD system requires an OBD2 scanner, which is available in a price range of
200 to 800, depending on the features oered. Additionally, the extracted data must
be transmitted to an Arduino or ESP32 microcontroller for further processing. While
this is theoretically possible, the exact implementation method, including communication
protocols between the OBD2 scanner and Arduino, requires further exploration through
Arduino forums and technical documentation.
There are multiple OBD scanner types and communication protocols (such as CAN,
K-Line, and Bluetooth/Wi-Fi transmission) that need to be investigated to ensure
compatibility and feasibility for our application.
6.4.3 MPU6050 Accelerometer/Gyroscope
The MPU6050, included in our starter kit, is a sensor module containing both an
accelerometer and a gyroscope. Using accelerometer data, we can estimate the distance
traveled by performing double integration of the acceleration values. However, this
approach is highly prone to error accumulation, making it less reliable than the other two
options.
Some technical sources indicate that the MPU6050, being a low-cost component, tends
to have a relatively high error margin. The cheapest (at 100 mg) loses its ability to
give 50-meter accuracy after around 10 seconds, while the best accelerometer (at 10 �g)
loses its 50-meter accuracy after around 17 minutes. However, these concerns are often
associated with scenarios where motion occurs in multiple directions. In our case, where
bus movement is primarily linear on relatively at roads, the acceleration in the
z-direction remains constant, potentially reducing some sources of error.
Instead of relying on the accelerometer alone, another possible approach is to use the
gyroscope on the bus wheels to calculate distance traveled. However, the feasibility
and accuracy of this method are uncertain, and further testing would be required to
determine whether it provides meaningful improvements.
6.4.4 RSSI‐Based Node Localization and Bus Tracking
To augment GPS, OBD and inertial methods, we use RSSI readings from roadside nodes
to infer bus position without satellites. The bus’s master node polls all nearby nodes
(e.g. 1 Hz) and selects the one with the highest RSSI (dBm) as the closest. During setup,
we record RSSI at known distances and t a log‐distance path‐loss model
RSSI(d) = RSSI
0
− 10 n log
10
(
d
d
0
)
.
Page 68 of 119